﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_IQC_ORDER
// * CreateDate    : 2012/4/15 0:40:29
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/15 0:40:29
// * LastChanger   : 2012/4/15 0:40:29
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class QcIqcOrderEntity : EntityBase
    {
        public QcIqcOrderTable TableSchema
        {
            get
            {
                return QcIqcOrderTable.Current;
            }
        }

        public QcIqcOrderEntity()
        {

        }

        public QcIqcOrderEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.PurArrivedId = Convert.ToString(CommonFunctions.ToObject(dr["PUR_ARRIVED_ID"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.ResultTag = Convert.ToInt32(CommonFunctions.ToObject(dr["RESULT_TAG"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public QcIqcOrderEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.PurArrivedId = Convert.ToString(CommonFunctions.ToObject(dr["PUR_ARRIVED_ID"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.ResultTag = Convert.ToInt32(CommonFunctions.ToObject(dr["RESULT_TAG"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcIqcOrderTable.Current;
            }
        }

        #region Perporty List
        public string OrderId
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_ORDER_ID)); }
            set { SetData(QcIqcOrderTable.C_ORDER_ID, value); }
        }

        public string PurArrivedId
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_PUR_ARRIVED_ID)); }
            set { SetData(QcIqcOrderTable.C_PUR_ARRIVED_ID, value); }
        }

        public string OrderCode
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_ORDER_CODE)); }
            set { SetData(QcIqcOrderTable.C_ORDER_CODE, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_STATUS)); }
            set { SetData(QcIqcOrderTable.C_STATUS, value); }
        }

        public int ResultTag
        {
            get { return Convert.ToInt32(GetData(QcIqcOrderTable.C_RESULT_TAG)); }
            set { SetData(QcIqcOrderTable.C_RESULT_TAG, value); }
        }

        public DateTime CreateDate
        {
            get { return Convert.ToDateTime(GetData(QcIqcOrderTable.C_CREATE_DATE)); }
            set { SetData(QcIqcOrderTable.C_CREATE_DATE, value); }
        }

        public string CreateBy
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_CREATE_BY)); }
            set { SetData(QcIqcOrderTable.C_CREATE_BY, value); }
        }

        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(QcIqcOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(QcIqcOrderTable.C_LAST_MODIFIED_DATE, value); }
        }

        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(QcIqcOrderTable.C_LAST_MODIFIED_BY, value); }
        }

        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(QcIqcOrderTable.C_APPROVED_DATE)); }
            set { SetData(QcIqcOrderTable.C_APPROVED_DATE, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_APPROVED_BY)); }
            set { SetData(QcIqcOrderTable.C_APPROVED_BY, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(QcIqcOrderTable.C_REMARK)); }
            set { SetData(QcIqcOrderTable.C_REMARK, value); }
        }

        #endregion
    }


}

